package com.abocode.aichat.server.context.delivery.reply;

import com.abocode.aichat.data.MessageStanza;
import io.netty.channel.Channel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author guanxf
 */
public class Replies {
    private List<Reply> replies = new ArrayList<>();

    public void addReply(Channel channel, MessageStanza stanza) {
        if (channel == null) {
            return;
        }
        replies.add(new Reply(channel, stanza));
    }

    public void addReply(List<Channel> channels, MessageStanza stanza) {
        if (channels == null || channels.isEmpty()) {
            return;
        }
        replies.add(new Reply(channels, stanza));
    }

    public List<Reply> getReplies() {
        return replies;
    }

    public void setReplies(List<Reply> replies) {
        this.replies = replies;
    }
}
